package java_collection.set;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import static java.lang.System.out;

public class ClearTest {

	public static void main(String[] args) {
		
		Set<Integer> set = new HashSet<>();
		set.addAll(Arrays.asList(1,2,3,4,5));
		
		out.println(set.size()); // 5
		out.println(set.isEmpty()); // false
		
		set.clear();
		
		out.println(set.size()); // 0
		out.println(set.isEmpty()); // true
	}
	
	
}
